package metalink.admin;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;
import java.sql.*;

import vo.*;
import vo.mixed.*;
import model.admin.*;
import myutil.*;


public class InviteIndividualMembers extends ActionSupport {
ArrayList<CollegeStaffVo> staff_email_ids=new ArrayList<CollegeStaffVo>();
public ArrayList<CollegeStaffVo> getStaff_email_ids() {
	return staff_email_ids;
}



public void setStaff_email_ids(ArrayList<CollegeStaffVo> staff_email_ids) {
	this.staff_email_ids = staff_email_ids;
}



public ArrayList<StudentDetailsVo> getStudent_email_ids() {
	return student_email_ids;
}



public void setStudent_email_ids(ArrayList<StudentDetailsVo> student_email_ids) {
	this.student_email_ids = student_email_ids;
}



ArrayList<StudentDetailsVo> student_email_ids=new ArrayList<StudentDetailsVo>();
	
	

	public String execute(){
	try {
		Connect c=new Connect();
		ResultSet rs=c.getResult("select * from student_details");
		while(rs.next()){
			StudentDetailsVo single_object=new StudentDetailsVo();
			single_object.setStudent_name(rs.getString("student_name"));
			single_object.setEmail_id(rs.getString("email_id"));
			student_email_ids.add(single_object);
		}
		rs=c.getResult("select * from college_staff");
		while(rs.next()){
			CollegeStaffVo single_object=new CollegeStaffVo();
			single_object.setStaff_name(rs.getString("staff_name"));
			single_object.setEmail_id(rs.getString("email_id"));
			staff_email_ids.add(single_object);
		}
		return SUCCESS;
	}  catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return ERROR;
	}
}



}
